package com.yanqu.backendweb.config;


import com.yanqu.backendweb.service.TSDbInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
public class WebConfig implements WebMvcConfigurer {

    @Autowired
    private TSDbInfoService tsDbInfoService;

    @Bean
    public void init(){
        System.out.println("启动加载数据到到内存开始");
        tsDbInfoService.loadDbToMemory();
        System.out.println("启动加载数据到到内存结束");
    }

}
